/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.yxw.yxnet_cd_center.customer_service.controller;

import com.yxw.yxnet_cd_center.common.utils.BaseResult;
import com.yxw.yxnet_cd_center.customer_service.dto.CustomQueryServiceDTO;
import com.yxw.yxnet_cd_center.customer_service.dto.CustomQueryWorkflowDTO;
import com.yxw.yxnet_cd_center.customer_service.dto.SessionTalkRecordDTO;
import com.yxw.yxnet_cd_center.customer_service.dto.YxcscServiceTalkRecordDTO;
import com.yxw.yxnet_cd_center.customer_service.dto.CustomerSetWorkFlowDTO;
import com.yxw.yxnet_cd_center.customer_service.dto.TechnicalSupportFinishWorkFlowDTO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.validation.constraints.NotNull;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.yxw.yxnet_cd_center.customer_service.vo.MqttServerInfor2JsVO;
import com.yxw.yxnet_cd_center.customer_service.utils.HttpUtils;


import com.yxw.yxnet_cd_center.customer_service.dto.CustomerRequestServiceDTO;
import com.yxw.yxnet_cd_center.customer_service.dto.YxcscFlockTalkRecordDTO;
import com.yxw.yxnet_cd_center.customer_service.entity.TechFlockUserEntity;
import com.yxw.yxnet_cd_center.customer_service.entity.YxCsUserEntity;
import com.yxw.yxnet_cd_center.customer_service.entity.YxCsWorkflowEntity;
import com.yxw.yxnet_cd_center.customer_service.entity.YxcscClientFiledServiceEntity;
import com.yxw.yxnet_cd_center.customer_service.entity.YxcscCustomerAccessServiceEntity;
import com.yxw.yxnet_cd_center.customer_service.entity.YxcscServiceTalkRecordEntity;
import com.yxw.yxnet_cd_center.customer_service.service.IYxcscCustomerAccessServiceService;
import javax.validation.Valid;
import javax.annotation.Resource;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import javax.servlet.http.HttpServletRequest;
import com.yxw.yxnet_cd_center.common.utils.PasswordUtil;
import com.yxw.yxnet_cd_center.common.utils.SHASignUtil;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServletResponse;
/*
import com.yxw.customer_service_center.customer_service.service.IYxcscClientFiledServiceService;
import com.yxw.customer_service_center.customer_service.service.ISessionTalkRecordService;
import com.yxw.customer_service_center.customer_service.vo.MqttInforCustomerVO;
import com.yxw.customer_service_center.customer_service.vo.MqttInforFlockVO;
import com.yxw.customer_service_center.customer_service.vo.MqttInforSystemVO;
import com.yxw.customer_service_center.customer_service.vo.SenderVO;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSON;
import com.yxw.yxnet_cd_center.common.enums.ContentTypeEnum;
import com.yxw.customer_service_center.customer_service.dto.ClientFiledDTO;
*/

/**
 *
 * @author Administrator
 */
@Slf4j
@Api(value = "客服会话相关的操作管理", tags = {"客服会话相关的操作管理"})
@RestController
@RequestMapping("/customerprocess")
public class CustomerProcessController {    
    @Resource
    private IYxcscCustomerAccessServiceService oYxcscCustomerAccessServiceService;
    /*** 
    * 获取URLEncoder
    * @param matter
    * @return BaseResult
    **/
    @ApiOperation(value ="获取URLEncoder ",notes = "获取URLEncoder")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/geturlncoder")
    public BaseResult getURLEncoder(@RequestParam String matter)
    {
        try
        {
            matter = java.net.URLEncoder.encode(matter, "UTF-8");
        }
        catch(UnsupportedEncodingException oE)
        {
            System.out.println("getErrorLogFiles Exception:" + oE.getMessage());
        }       
        return BaseResult.success(matter);
    }
    /*** 
    * 获取日志文件列表
    * @param userId
    * @param logFilePath
    * @return BaseResult
    **/
    @ApiOperation(value ="获取日志文件列表 ",notes = "获取日志文件列表")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/getErrorLogFiles/{userId}")
    public BaseResult getErrorLogFiles(@PathVariable @NotNull(message = "用户id不能为空")Long userId,@RequestParam String logFilePath)
    {
        if(userId.intValue() != 9999)
        {
            return BaseResult.failed("没有权限");
        }
        return oYxcscCustomerAccessServiceService.getErrorLogFiles(logFilePath);
    }
    /*** 
    * 获取日志文件
    * @param userId
    * @param LogFilePath
    * @return BaseResult
    **/
    @ApiOperation(value ="获取日志文件 ",notes = "获取日志文件")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/getLogFile/{userId}")
    public void getLogFile(HttpServletResponse oResponse,@PathVariable @NotNull(message = "用户id不能为空")Long userId,@RequestParam String logFilePath)
    {
        if(userId.intValue() != 9999)
        {
            return;// BaseResult.failed("没有权限");
        }
        //HttpUtils.DownloadComplit(LogFilePath,Response);//,@RequestParam String fileName
        HttpUtils.download(oResponse,logFilePath);
        //return BaseResult.success();
    }
    /*** 
    * 获取文件
    * @param filepath
    **/
    @ApiOperation(value ="获取文件 filepath需要java.net.URLEncoder.encode",notes = "获取文件")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/getfile/{userId}")
    public void getFile(HttpServletResponse oResponse,@PathVariable @NotNull(message = "用户id不能为空")Long userId,@RequestParam String filepath)
    {
        if(userId.intValue() != 9999)
        {
            return;// BaseResult.failed("没有权限");
        }        
        //HttpUtils.downloadComplit(filepath,oResponse);
        //return BaseResult.success();
        HttpUtils.download(oResponse,filepath);
    }
    
    @ApiOperation(value ="密码在线加密接口",notes = "此接口用于在线加密密码")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/signUserPassword/{userId}/{userPassWord}")
    public BaseResult signUserPassword(@PathVariable @NotNull(message = "userId不能为空") Long userId,@PathVariable @NotNull(message = "userPassWord不能为空") String userPassWord)
    {
        String signMapLinkStr = "userId="+userId.toString()+"&userPassWord="+PasswordUtil.md5Hex(userPassWord);
        String sign = SHASignUtil.SHA1Hex(signMapLinkStr);
        return BaseResult.success("sign:" + sign);        
    }
    /*** 
    * 发送数据到Mqtt的某个主题测试
    * @param userId
    * @return MqttServerInforVO

    @ApiOperation(value ="发送数据到Mqtt的某个主题测试 ",notes = "此接口用于发送数据到Mqtt的某个主题测试")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/sendTest")
    public BaseResult sendTest(@RequestParam(value = "topic") @NotBlank(message = "主题不能为空" ) String topic,@RequestParam(value = "sendMessage") @NotBlank(message = "发送的消息不能为空" ) String sendMessage)
    {
        oMqttGateway.sendToMqtt(topic, "sendMessage:" + sendMessage);
        return BaseResult.success();
    }
    **/
    /*** 
    * 获取Mqtt服务器信息(未加密)
    * @param userId
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="根据用户Id获取Mqtt服务器信息，以及需要订阅的主题(未加密)",notes = "此接口用于js端,根据用户Id获取Mqtt服务器信息，以及需要订阅的主题(未加密)")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = MqttServerInfor2JsVO.class),})
    @GetMapping("/getMqttInfoNotSafe/{userId}")
    public BaseResult getMqttInfoNotSafe(@PathVariable @NotNull(message = "用户id不能为空")Long userId)
    {
        return oYxcscCustomerAccessServiceService.getMqttInfoNotSafe("yxnet", userId);
    }    
    
    /*** 
    * 获取Mqtt服务器信息(加密)
    * @param userId
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="根据用户Id获取Mqtt服务器信息，以及需要订阅的主题(加密) ",notes = "此接口用于js端,根据用户Id获取Mqtt服务器信息，以及需要订阅的主题(加密)")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = MqttServerInfor2JsVO.class),})
    @GetMapping("/getMqttInfo/{userId}")
    public BaseResult getMqttInfo(HttpServletRequest httpRequest,@PathVariable @NotNull(message = "用户id不能为空")Long userId)
    {
        return oYxcscCustomerAccessServiceService.getMqttInfo(httpRequest,"yxnet", userId);
    }
    
    /*** 
    * JS客服端完成MQTT主题订阅知会服务器接口
    * @param userId
    * @param result
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="JS客服端完成MQTT主题订阅知会服务器接口",notes = "此接口用于js端,JS客服端完成MQTT主题订阅知会服务器接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxCsUserEntity.class),})
    @GetMapping("/jsClientSubscribeTopicResult/{userId}/{result}")
    public BaseResult jsClientSubscribeTopicResult(@PathVariable @NotNull(message = "用户id不能为空")Long userId,@PathVariable @NotNull(message = "订阅结果不能为空")Integer result)
    {
        return oYxcscCustomerAccessServiceService.jsClientSubscribeTopicResult(userId, result);
    }    
    
    /*** 
    * 客服申请某个服务
    * @param userId
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="客服申请某个服务",notes = "此接口用于js端,客服申请某个服务")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/customerRequestService")
    public BaseResult customerRequestService(@RequestBody @Valid CustomerRequestServiceDTO oCustomerRequestServiceDTO)
    {
        return oYxcscCustomerAccessServiceService.customerRequestService(oCustomerRequestServiceDTO);
    }

    /*** 
    * 客服将某个服务指派给别人
    * @param userId
    * @param toCustomerId
    * @param sessionId
    * @return BaseResult
    **/
    @ApiOperation(value ="客服将某个服务指派给别人",notes = "此接口用于js端,客服将某个服务指派给别人")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/customerSetServiceToCustomer/{userId}/{toCustomerId}/{sessionId}")
    public BaseResult customerSetServiceToCustomer(@PathVariable @NotNull(message = "申请人userId不能为空")Long userId,@PathVariable @NotNull(message = "指派对象toCustomerId不能为空")Long toCustomerId,@PathVariable @NotNull(message = "sessionId不能为空")String sessionId)
    {
        return oYxcscCustomerAccessServiceService.customerSetServiceToCustomer(userId, toCustomerId, sessionId);
    }
    /*** 
    * 客服申请技术组协助/工作组转接/生成工单任务
    * @param userId
    * @param flockId
    * @param sessionId
    * @return BaseResult
    **/
    @ApiOperation(value ="客服申请技术组协助/工作组转接/生成工单任务",notes = "此接口用于js端,客服申请技术组协助/工作组转接/生成工单任务")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/customerSetWorkflowToTechnicalSupportFlock")
    public BaseResult customerSetWorkflowToTechnicalSupportFlock(@RequestBody @Valid CustomerSetWorkFlowDTO oCustomerSetWorkFlowDTO)
    {
        return oYxcscCustomerAccessServiceService.customerSetWorkflowToTechnicalSupportFlock(oCustomerSetWorkFlowDTO);
    } 
    
    /*** 
    * 技术支持组成员申请接受技术支持/点击接收
    * @param userId
    * @param flockId
    * @param workflowId
    * @return BaseResult
    **/
    @ApiOperation(value ="技术支持组成员申请接受技术支持/点击接收",notes = "此接口用于js端,技术支持组成员申请接受技术支持/点击接收")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/technicalSupportAcceptWorkFlow/{userId}/{workflowId}")
    public BaseResult technicalSupportAcceptWorkFlow(@PathVariable @NotNull(message = "申请人userId不能为空")Long userId,@PathVariable @NotNull(message = "工单Id不能为空")Long workflowId)
    {
        return oYxcscCustomerAccessServiceService.technicalSupportAcceptWorkFlow(userId,workflowId);
    }

    /*** 
    * 技术支持组管理员指派工单/技术支持
    * @param managerId
    * @param userId
    * @param sessionId
    * @param workflowId
    * @return BaseResult
    **/
    @ApiOperation(value ="技术支持组管理员指派工单/技术支持",notes = "此接口用于js端,技术支持组管理员指派工单/技术支持")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/technicalSupportManagerSetWorkFlow/{managerId}/{userId}/{workflowId}")
    public BaseResult technicalSupportManagerSetWorkFlow(@PathVariable @NotNull(message = "管理原Id不能为空")Long managerId,@PathVariable @NotNull(message = "技术支持人员Id不能为空")Long userId,@PathVariable @NotNull(message = "工单Id不能为空")Long workflowId)
    {
        return oYxcscCustomerAccessServiceService.technicalSupportManagerSetWorkFlow(managerId, userId, workflowId);
    }    
    
    /*** 
    * 技术支持组成员完成技术支持/工单
    * @param oTechnicalSupportFinishWorkFlowDTO
    * @return BaseResult
    **/
    @ApiOperation(value ="技术支持组成员完成技术支持/工单",notes = "此接口用于js端,技术支持组成员完成技术支持/工单")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/TechnicalSupportFinishWorkFlow")
    public BaseResult TechnicalSupportFinishWorkFlow(@RequestBody @Valid TechnicalSupportFinishWorkFlowDTO oTechnicalSupportFinishWorkFlowDTO)
    {
        return oYxcscCustomerAccessServiceService.technicalSupportFinishWorkFlow(oTechnicalSupportFinishWorkFlowDTO);
    }
    
    /*** 
    * 系统用户发送聊天消息给某个客服群
    * @param oYxcscFlockTalkRecordDTO
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="系统用户发送聊天消息给某个客服群",notes = "此接口用于js端,系统用户发送聊天消息给某个客服群")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/sendTalkInforToGroup")
    public BaseResult sendTalkInforToGroup(@RequestBody @Valid YxcscFlockTalkRecordDTO oYxcscFlockTalkRecordDTO)
    {
        return oYxcscCustomerAccessServiceService.sendTalkInforToFlock(oYxcscFlockTalkRecordDTO);
    }
    /*** 
    *系统用户撤回/删除群聊天记录
    * @param customerId 客服Id
    * @param recordId 聊天记录Id
    * @param operationType为操作类型:1删除消息,2撤回消息
    * @return BaseResult
    **/
    @ApiOperation(value ="系统用户撤回/删除群聊天记录",notes = "此接口用于js端,系统用户撤回/删除群聊天记录,operationType为操作类型:1删除消息,2撤回消息")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/userRevokeFlockTalkRecord/{userId}/{recordId}/{operationType}")
    public BaseResult userRevokeFlockTalkRecord(@PathVariable @NotNull(message = "客服id不能为空") Long userId,@PathVariable @NotNull(message = "聊天记录id不能为空") Long recordId,@PathVariable @NotNull(message = "操作类型不能为空") Integer operationType)
    {
        return oYxcscCustomerAccessServiceService.userRevokeFlockTalkRecord(userId, recordId, operationType);
    }    
    /*** 
    * 发送聊天消息给某个客户
    * @param userId
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="客服发送聊天消息给某个客户",notes = "此接口用于js端,客服发送聊天消息给某个客户")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @PostMapping("/sendTalkInforToClient")
    public BaseResult sendTalkInforToClient(@RequestBody @Valid SessionTalkRecordDTO oSessionTalkRecordDTO)
    {       
        return oYxcscCustomerAccessServiceService.sendTalkInforToClient(oSessionTalkRecordDTO);
    }
    /*** 
    *客服撤回/删除聊天记录接口
    * @param customerId 客服Id
    * @param recordId 聊天记录Id
    * @param operationType为操作类型:1删除消息,2撤回消息
    * @return BaseResult
    **/
    @ApiOperation(value ="客服撤回/删除发给客户聊天记录",notes = "此接口用于js端,客服撤回/删除发给客户的聊天记录,operationType为操作类型:1删除消息,2撤回消息")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/customerRevokeServiceTalkRecord/{customerId}/{recordId}/{operationType}")
    public BaseResult customerRevokeServiceTalkRecord(@PathVariable @NotNull(message = "客服id不能为空") Long customerId,@PathVariable @NotNull(message = "聊天记录id不能为空") Long recordId,@PathVariable @NotNull(message = "操作类型不能为空") Integer operationType)
    {
        return oYxcscCustomerAccessServiceService.customerRevokeServiceTalkRecord(customerId, recordId, operationType);
    }
    /*** 
    * 客服完成某个服务接口
    * @param userId
    * @return MqttServerInforVO
    **/
    @ApiOperation(value ="客服完成某个服务接口",notes = "此接口用于js端,客服完成某个服务")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/customerFinishOneService/{userId}/{sessionId}")
    public BaseResult customerFinishOneService(@PathVariable @NotNull(message = "用户id不能为空")Long userId,@PathVariable @NotNull(message = "sessionId不能为空")String sessionId)
    {
        return oYxcscCustomerAccessServiceService.customerFinishOneService(userId, sessionId);
    }
    /*** 
    * 客服邀请客户对本次服务评分接口
    * @param userId  用户Id
    * @param sessionId  服务Id
    * @return BaseResult
    **/
    @ApiOperation(value ="客服邀请客户对本次服务评分接口",notes = "此接口用于js端,客服邀请客户对本次服务评分接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = BaseResult.class),})
    @GetMapping("/customerInviteClientScore/{userId}/{sessionId}")
    public BaseResult customerInviteClientScore(@PathVariable @NotNull(message = "用户id不能为空")Long userId,@PathVariable @NotNull(message = "sessionId不能为空")String sessionId)
    {
        return oYxcscCustomerAccessServiceService.customerInviteClientScore(userId,sessionId);
    }
    /*** 
    * 客服查询服务聊天记录接口
    * @param currentPage 当前页
    * @param pageSize 分页大小
    * @param oYxcscFlockTalkRecordDTO
    * @return Page
    **/
    @ApiOperation(value ="客服查询服务聊天记录接口",notes = "此接口用于js端,客服查询服务聊天记录接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxcscServiceTalkRecordEntity.class),})
    @PostMapping("/customerQueryTalkRecord/{currentPage}/{pageSize}")
    public BaseResult customerQueryTalkRecord(@PathVariable @NotNull(message = "当前页不能为空")Integer currentPage,@PathVariable @NotNull(message = "分页大小不能为空")Integer pageSize,@RequestBody @Valid YxcscServiceTalkRecordDTO oYxcscServiceTalkRecordDTO)
    {
        return oYxcscCustomerAccessServiceService.customerQueryTalkRecord(currentPage, pageSize, oYxcscServiceTalkRecordDTO);
    }
    /*** 
    * 系统用户查询群聊天记录接口
    * @param flockId 群Id
    * @param currentPage 当前页
    * @param pageSize 分页大小
    * @return Page
    **/
    @ApiOperation(value ="系统用户查询群聊天记录接口",notes = "此接口用于js端,系统用户查询群聊天记录")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxcscServiceTalkRecordEntity.class),})
    @GetMapping("/customerQueryFlockTalkRecord/{flockId}/{currentPage}/{pageSize}")
    public BaseResult customerQueryFlockTalkRecord(@PathVariable @NotNull(message = "当前页不能为空") Long flockId,@PathVariable @NotNull(message = "当前页不能为空")Integer currentPage,@PathVariable @NotNull(message = "分页大小不能为空")Integer pageSize)
    {
        //return BaseResult.success(); 
        return oYxcscCustomerAccessServiceService.customerQueryFlockTalkRecord(flockId, currentPage, pageSize);
    }    
    /*** 
    * 客服查询服务接口
    * @param currentPage 当前页
    * @param pageSize 分页大小
    * @param oCustomQueryServiceDTO
    * @return Page
    **/
    @ApiOperation(value ="客服查询服务接口",notes = "此接口用于js端,客服查询服务接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxcscClientFiledServiceEntity.class),})
    @PostMapping("/customerQueryService/{currentPage}/{pageSize}")    
    public BaseResult customerQueryService(@PathVariable @NotNull(message = "当前页不能为空")Integer currentPage,@PathVariable @NotNull(message = "分页大小不能为空")Integer pageSize,@RequestBody @Valid CustomQueryServiceDTO oCustomQueryServiceDTO)
    {
        return oYxcscCustomerAccessServiceService.customerQueryService(currentPage, pageSize, oCustomQueryServiceDTO);
    }
    /*** 
    * 客服查询服务详情接口
    * @param sessionId  服务Id
    * @return Page
    **/
    @ApiOperation(value ="客服查询服务详情接口",notes = "此接口用于js端,客服查询服务详情接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxcscClientFiledServiceEntity.class),})
    @GetMapping("/customerQueryServiceById/{sessionId}")
    public BaseResult customerQueryServiceById(@PathVariable @NotNull(message = "sessionId不能为空")String sessionId)
    {
        return oYxcscCustomerAccessServiceService.customerQueryServiceById(sessionId);
    }
    /*** 
    * 客服查询服务流转接口
    * @param currentPage 当前页
    * @param pageSize 分页大小
    * @param oCustomQueryWorkflowDTO
    * @return Page
    **/
    @ApiOperation(value ="客服查询服务流转接口",notes = "此接口用于js端,客服查询服务流转接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxCsWorkflowEntity.class),})
    @PostMapping("/CustomQueryWorkflow/{currentPage}/{pageSize}")       
    public BaseResult CustomQueryWorkflow(@PathVariable @NotNull(message = "当前页不能为空")Integer currentPage,@PathVariable @NotNull(message = "分页大小不能为空")Integer pageSize,@RequestBody @Valid CustomQueryWorkflowDTO oCustomQueryWorkflowDTO)
    {
        return oYxcscCustomerAccessServiceService.customQueryWorkflow(currentPage, pageSize, oCustomQueryWorkflowDTO);
    }
    /*** 
    * 客服查询服务流转详情接口
    * @param workflowId 服务流转记录Id
    * @return Page
    **/
    @ApiOperation(value ="客服查询服务流转详情接口",notes = "此接口用于js端,客服查询服务流转详情接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxCsWorkflowEntity.class),})
    @GetMapping("/CustomQueryWorkflowById/{workflowId}")
    public BaseResult CustomQueryWorkflowById(@PathVariable @NotNull(message = "服务流转记录Id不能为空") Long workflowId)
    {
        return oYxcscCustomerAccessServiceService.customQueryWorkflowById(workflowId);
    }
    /*** 
    * 客服查询技术支持组成员列表接口
    * @param customerId 客服Id
    * @return Page
    **/
    @ApiOperation(value ="客服查询技术支持组成员列表接口",notes = "此接口用于js端,客服查询技术支持组成员列表接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = TechFlockUserEntity.class),})
    @GetMapping("/CustomQueryTechnicalSupportFlockUsers")
    public BaseResult CustomerQueryTechnicalSupportFlockUsers()
    {
        return oYxcscCustomerAccessServiceService.customerQueryTechnicalSupportFlockUsers();
    }

    /*** 
    * 客服查询某个服务中自己所处理的会话接口
    * @param sessionId  服务Id
    * @param customerId  客服Id
    * @return Page
    **/
    @ApiOperation(value ="客服查询某个服务中自己所处理的会话接口",notes = "此接口用于js端,客服查询某个服务中自己所处理的会话接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxcscClientFiledServiceEntity.class),})
    @GetMapping("/queryCustomerAccessService/{sessionId}/{customerId}")
    public BaseResult queryCustomerAccessService(@PathVariable @NotNull(message = "sessionId不能为空")String sessionId,@PathVariable @NotNull(message = "客服id不能为空") Long customerId)
    {
        return oYxcscCustomerAccessServiceService.queryCustomerAccessService(sessionId,customerId);
    }
    /*** 
    * 根据客服会话Id查询聊天记录接口
    * @param currentPage 当前页
    * @param pageSize 分页大小
    * @param oCustomQueryWorkflowDTO
    * @return Page
    **/
    @ApiOperation(value ="根据客服会话Id查询聊天记录接口",notes = "此接口用于js端,根据客服会话Id查询聊天记录接口")
    @ApiResponses({@ApiResponse(code = 200,message = "OK",response = YxCsWorkflowEntity.class),})
    @PostMapping("/queryServiceTalkRecordByCustomerAccessIds/{currentPage}/{pageSize}")       
    public BaseResult queryServiceTalkRecordByCustomerAccessIds(@PathVariable @NotNull(message = "当前页不能为空")Integer currentPage,@PathVariable @NotNull(message = "分页大小不能为空")Integer pageSize,@RequestBody List<YxcscCustomerAccessServiceEntity> oListCustomerAccessService)
    {
        return oYxcscCustomerAccessServiceService.queryServiceTalkRecordByCustomerAccessIds(currentPage, pageSize, oListCustomerAccessService);
    }    
}